package com.util;

public class FrameDto {
	/**帧头*/
	private final byte head=0x7E; 
	/**设备地址*/
	private final byte address=0x01;
	/**命令字*/
	private byte order;
	/**数据长度*/
	private byte[] dataSize;
	/**数据*/
	private byte[] data;
	/**校验*/
	private byte check;
	/**帧尾*/
	private final byte last=0X7F;
	
	
	public byte getOrder() {
		return order;
	}
	public void setOrder(byte order) {
		this.order = order;
	}
	public byte[] getDataSize() {
		return dataSize;
	}
	public void setDataSize(byte[] dataSize) throws Exception {
		if(dataSize.length!=2) {
			throw new Exception("���ݳ��ȸ�ֵʧ�ܣ����Ȳ��Ϸ�");
		}
		this.dataSize = dataSize;
	}
	public byte[] getData() {
		return data;
	}
	public void setData(byte[] data) {
		this.data = data;
	}
	public byte getCheck() {
		return check;
	}
	public void setCheck(byte check) {
		this.check = check;
	}
	public byte getLast() {
		return last;
	}
	public byte getHead() {
		return head;
	}
	public byte getAddress() {
		return address;
	}
	
	
}
